/*	******************************************
	File:		faceThread.cpp
	Author:		Adnan Srna, Peter Kober, Ivo Havranek
	Purpose:	AugmentedReality 2
	(up)Date:	March/April 2010
	Descr.:		implementation of the threading for
				faceTracking
	Origin:		Salzburg University of Applied Science
	******************************************	*/

#include "faceThread.h"

faceThread::faceThread(){
}

faceThread::~faceThread(){
}

void faceThread::threadedFunction(){
	
	while(isThreadRunning()){
		lock();
		if(isThreadRunning()){
			faceTool.update();
			faceTool.draw();
		}
		unlock();
	}
}

void faceThread::start(){
	startThread(true, false);
	faceTool.setup();
}

void faceThread::stop(){
	stopThread();
}

void faceThread::draw(){
	faceTool.draw();
}
